package cn.kust.clock.pojo.vo;

import cn.kust.clock.pojo.entity.Clock;
import cn.kust.clock.pojo.entity.Image;
import cn.kust.clock.pojo.entity.Video;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author bjs
 * @date 2022/7/20 0020  20:02
 **/
@Data
@NoArgsConstructor
public class ClockDetailVO {
    private Long id;//打卡id

    private Object user;//后期做修改，这里需要远程调用

    private String title;//打卡标题

    private String content;//打卡正文

    private String position;//打卡地址

    private String location;//打卡经纬度

    private String tags;//打卡类型

    private LocalDateTime gmtCreate;//创建时间

    private LocalDateTime gmtModified;//修改时间

    private List<Image> images;//图片列表

    private List<Video> videos;//视频列表

    private Integer likeNum;//点赞数

    private Integer commentNum;//评论总数

    public ClockDetailVO(Clock clock, Object user,List<Image> images, List<Video> videos, Integer likeNum,Integer commentNum) {
        this.id = clock.getId();
        this.user = user;
        this.location = clock.getLocation();
        this.title = clock.getTitle();
        this.content = clock.getContent();
        this.position = clock.getPosition();
        this.tags = clock.getTags();
        this.gmtCreate = clock.getGmtCreate();
        this.gmtModified = clock.getGmtModified();
        this.images = images;
        this.videos = videos;
        this.likeNum = likeNum;
        this.commentNum = commentNum;
    }
}
